{yun:}include file="$wapstyle/member/cheader.htm"{/yun}
<link rel="stylesheet" href="{yun:}$config_wapdomain{/yun}/js/mui/css/mui.picker.min.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<link rel="stylesheet" href="{yun:}$config_wapdomain{/yun}/js/mui/css/mui.poppicker.css?v={yun:}$config.cachecode{/yun}" type="text/css" />
<div class="yun_com_msg">参加活动需满足：至少有1个正在招聘中的职位</div>
<section class="wap_member">
    <div class="wap_member_comp_h1"><span>好友助力</span></div>
        <div class="help_member_fbbox">
  
<!--正在进行中-->

{yun:}if $helpinfo{/yun}
<div class="help_member_jxzbox mt10">
  <div class="help_member_fb_h1"> 呼朋唤友</div>
    <div class="help_member_jxz_jsp">分享助力正在进行中...</div>
<div class="help_member_jxz">
	{yun:}if $helpinfo.zlnum>0{/yun}
	<div class="help_member_jxz_mq"><a href="javascript:;" onclick="getlog('{yun:}$helpinfo.id{/yun}');">目前已有 {yun:}$helpinfo.zlnum{/yun}  位好友为您助力 ></a></div>
	<div class="help_member_jxz_tx">
		{yun:}foreach from=$loglist key=key item=log{/yun} 
			{yun:}if $key<5{/yun}
			<img src="{yun:}$log.wxpic{/yun}" width="40" height="40">
			{yun:}/if{/yun}
		{yun:}/foreach{/yun}
	</div>
	{yun:}else{/yun}
		<div class="help_member_jxz_mq">还没有好友为您助力哦！赶快邀请好友吧~</div>
	 {yun:}/if{/yun}
     <div class=""> <a  href="javascript:;" onclick="addhelp();"  class="help_member_fb_cj">邀请好友 , 帮我助力</a></div>
     <div class="help_member_jxz_sy"><a href="javascript:;" onclick = "getpackage('{yun:}$helpinfo.id{/yun}');" class="">领取权益 ></a></div>
	
</div>
</div>
{yun:}else{/yun}

  <div class="help_member_fb">
       <div class="help_member_fb_h1"> 邀请好友助力</div>
    <div class="help_member_jxz_jsp">好友助力您可免费获得招聘权限</div>
     <div class="help_member_fb_frist"> <a href="javascript:;" onclick="addhelp();" class="help_member_fb_cj">立即参加，领取福利</a></div>
</div>
{yun:}/if{/yun}
{yun:}foreach from=$rows item=list{/yun}
<div class="help_member_jxz">
<div class="help_member_jxz_tit">助力活动已结束</div>
<div class="">开始时间：{yun:}$list.stime|date_format:"%Y-%m-%d %H:%M"{/yun}</div>

<div class="">结束时间：{yun:}$list.etime|date_format:"%Y-%m-%d %H:%M"{/yun}</div>
<div class="">
	共有 {yun:}$list.zlnum{/yun}  位好友为您助力
	{yun:}if $list.zlnum > 0{/yun}
	<a href="javascript:;" onclick="getlog('{yun:}$list.id{/yun}');"  class="help_member_look_py">查看助力好友</a>
	{yun:}/if{/yun}
</div>
<div class="help_member_look_hd">
	<div class="" style="color:#999">获得权益：</div>
	{yun:}foreach from=$list.getpackage item=packlist{/yun}
		<span  style="width:32%; display:inline-block; font-size:12px;">{yun:}$packlist.name{/yun}： {yun:}$packlist.num{/yun} </span>
	{yun:}/foreach{/yun}
</div>
<div class="help_member_look_box">
{yun:}if $list.state == 1{/yun}
<span class="help_member_fb_end">已领取权益</span>

{yun:}else{/yun}
<a href="javascript:;" onclick = "getpackage('{yun:}$list.id{/yun}');" class="help_member_fb_lq">领取权益</a>

{yun:}/if{/yun}
</div>

</div>
{yun:}/foreach{/yun}


</div>
</section>

<div class="help_hytck_all none">
<div style="width:100%;height:100%; background:rgba(0,0,0,0.5); position:fixed;left:0px;top:0px;"></div>
<div class="help_hytck ">
<div class="help_hytck_tit">助力好友<a  href="javascript:;" class="help_hytck_close"></a></div>
<div class="help_hytck_tx_box">
<div class="help_hytck_tx">
</div>
</div>
</div>
</div>
<div class="pages"> {yun:}$pagenav{/yun}</div>
<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.picker.min.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config_wapdomain{/yun}/js/mui/mui.poppicker.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script>

mui.init();
$(function(){

	$('.help_hytck_close').click(function(){
	
		$('.help_hytck_all').hide();
	
	});

})
function toresume(id,url){
	$.post('index.php?c=toresume',{id:id},function(data){
		window.location.href = url;	
	});
}

function addhelp(){

	
	
	layer_load('执行中，请稍候...');

	
	$.post('index.php?c=addfriendhelp',{rand:Math.random()},function(data){
		layer.closeAll();
		data = eval('('+data+')');
		if(data.url){
			location.href=data.url;
		
		}else if(data.msg){
			layermsg(data.msg, 2);
		
		}else{
			layermsg('助力开启失败！', 2);
		}
	
	});
}

function getpackage(id){

	
	layer_load('执行中，请稍候...');

	
	$.post('index.php?c=getpackage',{id:id},function(data){
		layer.closeAll();
		data = eval('('+data+')');
		if(data.msg){
			layermsg(data.msg, 2);
		
		}else{
			layermsg('领取失败', 2);
		}
	
	});
}

function getlog(id){

	layer_load('执行中，请稍候...');

	$('.help_hytck_tx').html('');
	var html = '';
	$.post('index.php?c=getlog',{id:id},function(data){
		layer.closeAll();
		if(data){
		
			data = eval('('+data+')');

			for(var k in data){
				
				html = html + '<img src="'+data[k].wxpic+'" width="40" height="40">';
			}
			
			$('.help_hytck_tx').html(html);

			$('.help_hytck_all').show();
		}else{
			layermsg('没有好友帮您助力！', 2);
		}

	});

}

</script>
{yun:}include file="$wapstyle/footer.htm"{/yun} 